package org.osiris.persistence.controllers;

import java.util.List;

import javax.persistence.EntityManager;

import org.osiris.persistence.Recurso;
import org.osiris.persistence.controllers.exceptions.IllegalOrphanException;
import org.osiris.persistence.controllers.exceptions.NonexistentEntityException;
import org.osiris.persistence.controllers.exceptions.PreexistingEntityException;

public interface RecursoInterface {

	public abstract EntityManager getEntityManager();

	public abstract void create(Recurso recurso)
			throws PreexistingEntityException, Exception;

	public abstract void edit(Recurso recurso) throws IllegalOrphanException,
			NonexistentEntityException, Exception;

	public abstract void destroy(Long id) throws IllegalOrphanException,
			NonexistentEntityException;

	public abstract List<Recurso> findRecursoEntities();

	public abstract List<Recurso> findRecursoEntities(int maxResults,
			int firstResult);

	public abstract Recurso findRecurso(Long id);

	public abstract int getRecursoCount();

}